package org.wanda.pv.framework.utils;

import java.util.Date;

public class CompareUtil {

    public static int compareByDate(Date d1,Date d2){
        return d2.compareTo(d1);
    }


    /**
     * 按照整数类型升序排列
     * @param i1
     * @param i2
     * @return
     */
    public static int compareByInt(Integer i1,Integer i2){
        return i1-i2;
    }

    /**
     * 字符类型按照 字母升序排列
     * @param s1
     * @param s2
     * @return
     */
    public static int compareByStr(String s1,String s2){
        return s1.compareToIgnoreCase(s2);
    }


}
